home *** CD-ROM | disk | FTP | other *** search
- Path: anvil.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: C/C++ Unix port advise
- Date: 27 Feb 1996 15:48:35 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4h058jINNg4k@anvil.ugrad.cs.ubc.ca>
- References: <4gvri8$q94@symiserver2.symantec.com>
- NNTP-Posting-Host: anvil.ugrad.cs.ubc.ca
-
- In article <4gvri8$q94@symiserver2.symantec.com>,
- kirsten konopaski <kkonopa@symantec.com> wrote:
- >Hi anyone,
- >
- >My experience is in C/C++ for both Windows 3.x/4.x and DOS targets. I am now
- >tasked with writing a 32bit application that will link to a third party DLL to
- ^^^^^^^^^^^^^^^^^
-
- You can't have any other! There is no need for such terminology in the UNIX
- world. :))
-
- >run on HP Unix.
-
- >I only have the typical development tools for PCs (ie: Symantec C++ and
- >Microsoft C++ dev tools). I would like to do my development here, and then port
- >to unix.
- >
- >Any recommendations on where to start and what compiler/linker settings are
- >necessary so that I don't shoot myself in the foot? ie: (paragraph alignment,
- >data types, etc.).
-
- You don't worry about ``paragraph alignment''---there is no such thing;
- paragraphs are an 8086 idiom. The HP-UX process memory model is not segmented,
- hence no paragraphs. (Actually the HPPA processor does support segmentation,
- but it's a whole different thing that you don't have to be concerned about).
-
- The alignment is for the most part directed by the requirements of the
- processor. For example, all integers (which are 32-bit) are stored at addresses
- that are divisible by four. Trying to store an integer at a different address
- will result in a fault.
-
- I've never had to give a UNIX compiler directives to influence things like
- structure packing, though it's possible.
-
- You don't have to worry about different kinds of memory models. There is only
- one, really. HP-UX gives your process a 4GB virtual address space. The first
- ``quadrant'' (1GB) is for your code. The second for data/stack. The third is
- where shared libraries go. And the fourth is for the kernel. You are not ever
- likely to run out of stack or heap space; as you allocate more storage, the OS
- just ``automagically'' adds more pages to your address space.
-
- >Where can I get info on HP unix compilers: cc or gcc? Is there a good third
- >party book on the basics? And where can I get the HP UNIX compiler/linker for C
-
- The HP-UX cc man page explains all of the options of their compiler, and
- the ld man page describes the linker. You are bound to have some printed
- documentation as well. The HP web site also has all kinds of documents; for
- example, you can download a big document about the HPPA-RISC instruction set
- and programming in assembly language. Where you can get the compiler and
- linker is from a Hewlett-Packard representative. GCC is freely available, but
- unless you get binaries, you need HP's compiler to compile GCC.
- --
-
-